package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_library")
load("//tools:defaults.bzl", "ng_module")

ng_module(
    name = "mdc-helpers",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = glob(["**/*.html"]),
    module_name = "@angular/material-experimental/mdc-helpers",
    deps = [
        "@npm//@angular/core",
    ],
)

# Add all MDC Sass files that we depend on here. After updating MDC dependencies, use the following
# command to generate an updated list:
#
# `find node_modules/@material/ -name "_*.scss" | sort | sed -r 's/(.*\/@material\/[^/]*)\/(.*)/"@npm\/\/\1:\2",/'`
#
# TODO(mmalerba): Find a less tedious way to do this...
sass_library(
    name = "mdc_scss_deps_lib",
    srcs = [
        "@npm//node_modules/@material/animation:_functions.scss",
        "@npm//node_modules/@material/animation:_variables.scss",
        "@npm//node_modules/@material/base:_mixins.scss",
        "@npm//node_modules/@material/button:_mixins.scss",
        "@npm//node_modules/@material/button:_variables.scss",
        "@npm//node_modules/@material/card:_mixins.scss",
        "@npm//node_modules/@material/card:_variables.scss",
        "@npm//node_modules/@material/checkbox:_functions.scss",
        "@npm//node_modules/@material/checkbox:_keyframes.scss",
        "@npm//node_modules/@material/checkbox:_mixins.scss",
        "@npm//node_modules/@material/checkbox:_variables.scss",
        "@npm//node_modules/@material/chips:_mixins.scss",
        "@npm//node_modules/@material/chips:_variables.scss",
        "@npm//node_modules/@material/dialog:_mixins.scss",
        "@npm//node_modules/@material/dialog:_variables.scss",
        "@npm//node_modules/@material/drawer:_mixins.scss",
        "@npm//node_modules/@material/drawer:_variables.scss",
        "@npm//node_modules/@material/elevation:_mixins.scss",
        "@npm//node_modules/@material/elevation:_variables.scss",
        "@npm//node_modules/@material/fab:_mixins.scss",
        "@npm//node_modules/@material/fab:_variables.scss",
        "@npm//node_modules/@material/feature-targeting:_functions.scss",
        "@npm//node_modules/@material/feature-targeting:_mixins.scss",
        "@npm//node_modules/@material/feature-targeting:_variables.scss",
        "@npm//node_modules/@material/floating-label:_mixins.scss",
        "@npm//node_modules/@material/floating-label:_variables.scss",
        "@npm//node_modules/@material/form-field:_mixins.scss",
        "@npm//node_modules/@material/form-field:_variables.scss",
        "@npm//node_modules/@material/grid-list:_mixins.scss",
        "@npm//node_modules/@material/grid-list:_variables.scss",
        "@npm//node_modules/@material/icon-button:_mixins.scss",
        "@npm//node_modules/@material/icon-button:_variables.scss",
        "@npm//node_modules/@material/image-list:_mixins.scss",
        "@npm//node_modules/@material/image-list:_variables.scss",
        "@npm//node_modules/@material/layout-grid:_mixins.scss",
        "@npm//node_modules/@material/layout-grid:_variables.scss",
        "@npm//node_modules/@material/line-ripple:_functions.scss",
        "@npm//node_modules/@material/line-ripple:_mixins.scss",
        "@npm//node_modules/@material/linear-progress:_keyframes.scss",
        "@npm//node_modules/@material/linear-progress:_mixins.scss",
        "@npm//node_modules/@material/linear-progress:_variables.scss",
        "@npm//node_modules/@material/list:_mixins.scss",
        "@npm//node_modules/@material/list:_variables.scss",
        "@npm//node_modules/@material/menu:_mixins.scss",
        "@npm//node_modules/@material/menu:_variables.scss",
        "@npm//node_modules/@material/menu-surface:_mixins.scss",
        "@npm//node_modules/@material/menu-surface:_variables.scss",
        "@npm//node_modules/@material/notched-outline:_mixins.scss",
        "@npm//node_modules/@material/notched-outline:_variables.scss",
        "@npm//node_modules/@material/radio:_functions.scss",
        "@npm//node_modules/@material/radio:_mixins.scss",
        "@npm//node_modules/@material/radio:_variables.scss",
        "@npm//node_modules/@material/ripple:_functions.scss",
        "@npm//node_modules/@material/ripple:_keyframes.scss",
        "@npm//node_modules/@material/ripple:_mixins.scss",
        "@npm//node_modules/@material/ripple:_variables.scss",
        "@npm//node_modules/@material/rtl:_mixins.scss",
        "@npm//node_modules/@material/select:_functions.scss",
        "@npm//node_modules/@material/select:_keyframes.scss",
        "@npm//node_modules/@material/select:_mixins.scss",
        "@npm//node_modules/@material/select:_variables.scss",
        "@npm//node_modules/@material/select:helper-text/_mixins.scss",
        "@npm//node_modules/@material/select:icon/_mixins.scss",
        "@npm//node_modules/@material/select:icon/_variables.scss",
        "@npm//node_modules/@material/shape:_functions.scss",
        "@npm//node_modules/@material/shape:_mixins.scss",
        "@npm//node_modules/@material/shape:_variables.scss",
        "@npm//node_modules/@material/slider:_keyframes.scss",
        "@npm//node_modules/@material/slider:_mixins.scss",
        "@npm//node_modules/@material/slider:_variables.scss",
        "@npm//node_modules/@material/snackbar:_mixins.scss",
        "@npm//node_modules/@material/snackbar:_variables.scss",
        "@npm//node_modules/@material/switch:_functions.scss",
        "@npm//node_modules/@material/switch:_mixins.scss",
        "@npm//node_modules/@material/switch:_variables.scss",
        "@npm//node_modules/@material/tab:_mixins.scss",
        "@npm//node_modules/@material/tab:_variables.scss",
        "@npm//node_modules/@material/tab-bar:_mixins.scss",
        "@npm//node_modules/@material/tab-indicator:_mixins.scss",
        "@npm//node_modules/@material/textfield:_functions.scss",
        "@npm//node_modules/@material/textfield:_mixins.scss",
        "@npm//node_modules/@material/textfield:_variables.scss",
        "@npm//node_modules/@material/textfield:character-counter/_mixins.scss",
        "@npm//node_modules/@material/textfield:helper-text/_mixins.scss",
        "@npm//node_modules/@material/textfield:icon/_mixins.scss",
        "@npm//node_modules/@material/textfield:icon/_variables.scss",
        "@npm//node_modules/@material/theme:_color-palette.scss",
        "@npm//node_modules/@material/theme:_constants.scss",
        "@npm//node_modules/@material/theme:_functions.scss",
        "@npm//node_modules/@material/theme:_mixins.scss",
        "@npm//node_modules/@material/theme:_variables.scss",
        "@npm//node_modules/@material/toolbar:_mixins.scss",
        "@npm//node_modules/@material/toolbar:_variables.scss",
        "@npm//node_modules/@material/top-app-bar:_mixins.scss",
        "@npm//node_modules/@material/top-app-bar:_variables.scss",
        "@npm//node_modules/@material/typography:_functions.scss",
        "@npm//node_modules/@material/typography:_mixins.scss",
        "@npm//node_modules/@material/typography:_variables.scss",
    ],
)

sass_library(
    name = "mdc_helpers_scss_lib",
    srcs = glob(["**/_*.scss"]),
    deps = [
        ":mdc_scss_deps_lib",
        "//src/material/core:core_scss_lib",
    ],
)
